{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 20,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "010100010001000100011111001100100101000001010101110010101011000001101101111100001101110110001001110110011101011001110001111110\n"
     ]
    }
   ],
   "source": [
    "import get_header\n",
    "\n",
    "h = get_header.GetHeader('c_s', 'user', 'success', 'NO', 'utf-8', 'modify', '204.148.21.114', '172.27.124.55')\n",
    "packet =  h.get_header('c_s', 'user', 'success', 'NO', 'utf-8', 'modify', '204.148.21.114', '172.27.124.55')\n",
    "print(packet)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "__init__() missing 8 required positional arguments: 'pac_type', 'sign', 'state', 'ack', 'code_type', 'control_type', 'src_id', and 'dst_id'",
     "output_type": "error",
     "traceback": [
      "\u001B[0;31m---------------------------------------------------------------------------\u001B[0m",
      "\u001B[0;31mTypeError\u001B[0m                                 Traceback (most recent call last)",
      "Input \u001B[0;32mIn [23]\u001B[0m, in \u001B[0;36m<cell line: 3>\u001B[0;34m()\u001B[0m\n\u001B[1;32m      1\u001B[0m \u001B[38;5;28;01mimport\u001B[39;00m \u001B[38;5;21;01mget_header\u001B[39;00m\n\u001B[0;32m----> 3\u001B[0m h \u001B[38;5;241m=\u001B[39m \u001B[43mget_header\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mGetHeader\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m      4\u001B[0m packet \u001B[38;5;241m=\u001B[39m  h\u001B[38;5;241m.\u001B[39mget_header(\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mc_s\u001B[39m\u001B[38;5;124m'\u001B[39m, \u001B[38;5;124m'\u001B[39m\u001B[38;5;124muser\u001B[39m\u001B[38;5;124m'\u001B[39m, \u001B[38;5;124m'\u001B[39m\u001B[38;5;124msuccess\u001B[39m\u001B[38;5;124m'\u001B[39m, \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mNO\u001B[39m\u001B[38;5;124m'\u001B[39m, \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mutf-8\u001B[39m\u001B[38;5;124m'\u001B[39m, \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mmodify\u001B[39m\u001B[38;5;124m'\u001B[39m, \u001B[38;5;124m'\u001B[39m\u001B[38;5;124m204.148.21.114\u001B[39m\u001B[38;5;124m'\u001B[39m, \u001B[38;5;124m'\u001B[39m\u001B[38;5;124m172.27.124.55\u001B[39m\u001B[38;5;124m'\u001B[39m)\n\u001B[1;32m      5\u001B[0m \u001B[38;5;28mprint\u001B[39m(packet)\n",
      "\u001B[0;31mTypeError\u001B[0m: __init__() missing 8 required positional arguments: 'pac_type', 'sign', 'state', 'ack', 'code_type', 'control_type', 'src_id', and 'dst_id'"
     ]
    }
   ],
   "source": [
    "import get_header\n",
    "\n",
    "h = get_header.GetHeader()\n",
    "packet =  h.get_header('c_s', 'user', 'success', 'NO', 'utf-8', 'modify', '204.148.21.114', '172.27.124.55')\n",
    "print(packet)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "010100010001000100011111001100100101000001010101110010101011000001101101111100001101110110001001110110011101100101111101111110\n"
     ]
    }
   ],
   "source": [
    "from get_header import get_packet\n",
    "\n",
    "packet =  get_packet('c_s', 'user', 'success', 'NO', 'utf-8', 'modify', '204.148.21.114', '172.27.124.55')\n",
    "\n",
    "print(packet)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}